<?php

use Illuminate\Database\Seeder;

class TicketFinancialStatusTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        DB::table('wy_ticket_financial_status')->truncate();
        for ($i = 1; $i <= 20; $i++) {
            DB::table('wy_ticket_financial_status')->insert([
                'type'              => rand(1, 4),
                'referrer_name'     => '李' . $i,
                'bonus'             => rand(100, 1000),
                'deduct_percentage' => rand(1, 100),
                'referrer_id'       => rand(1, 30),
                'merchant_id'       => rand(1, 5),
                'source_id'         => rand(1, 4),
                'admin_id'          => rand(1, 30),
                'status'            => 0,
                'created_at'        => date('Y-m-' . rand(1, 30) . ' H:i:s')
            ]);
        }
    }
}
